﻿using System.Collections.Generic;

namespace Nop.Web.Models.Security
{
    /// <summary>
    /// 菜单
    /// </summary>
    public class MenuModel
    {
        //public MenuModel()
        //{
        //    this.children = new List<MenuModel>();
        //}
        public string key { get; set; }
        public string value { get; set; }
        public string title { get; set; }
        /// <summary>
        /// 是否可选
        /// </summary>
        public bool selectable { get; set; }
        public IList<MenuModel> children { get; set; }
    }

    /// <summary>
    /// 菜单及权限
    /// </summary>
    public class MenuAuthorityModel
    {
        public MenuAuthorityModel()
        {
            this.authority = new List<string>();
            this.children = new List<MenuAuthorityModel>();
        }
        /// <summary>
        /// 菜单名
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 权限
        /// </summary>
        public List<string> authority { get; set; }
        /// <summary>
        /// 子菜单
        /// </summary>
        public List<MenuAuthorityModel> children { get; set; }
    }

}